package com.example.common.enumStatus;

import lombok.Getter;

/**
 * @author cc
 * @classname ResultCode
 * @description TODO
 * @date 2022/8/11 16:05
 */
@Getter
public enum ResultCode {   //规范响应体中的响应码和响应信息
    SUCCESS(200, "请求成功"),
    ERROR(500, "系统异常"),
    VALIDATE_FAILED(412, "参数校验失败"),
    NO_RESULT(200, "查询无结果");

    private final int code;
    private final String msg;

    ResultCode(int code, String msg) {
        this.code = code;
        this.msg = msg;
    }
}
